hace) años _to-primitive.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _typed-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _typed-buffer.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _typed.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _uid.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _user-agent.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _validate-collection.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _wks-define.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _wks-ext.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años _wks.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.delay.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.dict.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.function.part.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.get-iterator-method.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.get-iterator.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.is-iterable.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.number.iterator.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.object.classof.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.object.define.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.object.is-object.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.object.make.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.regexp.escape.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.string.escape-html.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años core.string.unescape-html.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es5.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.copy-within.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.every.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.fill.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.filter.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.find-index.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.find.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.for-each.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.from.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.index-of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.is-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.iterator.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.join.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.last-index-of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.map.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.reduce-right.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.reduce.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.slice.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.some.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.sort.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.array.species.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.date.now.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.date.to-iso-string.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.date.to-json.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.date.to-primitive.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.date.to-string.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.function.bind.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.function.has-instance.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.function.name.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.map.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.acosh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.asinh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.atanh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.cbrt.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.clz32.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.cosh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.expm1.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.fround.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.hypot.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.imul.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.log10.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.log1p.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.log2.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.sign.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.sinh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.tanh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.math.trunc.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.constructor.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.epsilon.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.is-finite.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.is-integer.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.is-nan.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.is-safe-integer.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.max-safe-integer.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.min-safe-integer.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.parse-float.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.parse-int.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.to-fixed.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.number.to-precision.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.assign.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.create.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.define-properties.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.define-property.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.freeze.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.get-own-property-descriptor.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.get-own-property-names.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.get-prototype-of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.is-extensible.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.is-frozen.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.is-sealed.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.is.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.keys.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.prevent-extensions.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.seal.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.set-prototype-of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.object.to-string.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.parse-float.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.parse-int.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.promise.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.apply.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.construct.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.define-property.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.delete-property.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.enumerate.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.get-own-property-descriptor.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.get-prototype-of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.get.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.has.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.is-extensible.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.own-keys.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.prevent-extensions.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.set-prototype-of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.reflect.set.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.regexp.constructor.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.regexp.flags.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.regexp.match.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.regexp.replace.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.regexp.search.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.regexp.split.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.regexp.to-string.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.set.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.anchor.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.big.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.blink.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.bold.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.code-point-at.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.ends-with.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.fixed.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.fontcolor.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.fontsize.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.from-code-point.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.includes.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.italics.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.iterator.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.link.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.raw.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.repeat.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.small.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.starts-with.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.strike.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.sub.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.sup.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.string.trim.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.symbol.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.array-buffer.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.data-view.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.float32-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.float64-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.int16-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.int32-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.int8-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.uint16-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.uint32-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.uint8-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.typed.uint8-clamped-array.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.weak-map.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es6.weak-set.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.array.flat-map.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.array.flatten.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.array.includes.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.asap.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.error.is-error.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.global.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.map.from.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.map.of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.map.to-json.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.clamp.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.deg-per-rad.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.degrees.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.fscale.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.iaddh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.imulh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.isubh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.rad-per-deg.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.radians.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.scale.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.signbit.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.math.umulh.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.object.define-getter.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.object.define-setter.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.object.entries.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.object.get-own-property-descriptors.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.object.lookup-getter.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.object.lookup-setter.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.object.values.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.observable.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.promise.finally.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.promise.try.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.define-metadata.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.delete-metadata.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.get-metadata-keys.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.get-metadata.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.get-own-metadata-keys.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.get-own-metadata.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.has-metadata.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.has-own-metadata.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.reflect.metadata.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.set.from.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.set.of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.set.to-json.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.string.at.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.string.match-all.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.string.pad-end.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.string.pad-start.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.string.trim-left.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.string.trim-right.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.symbol.async-iterator.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.symbol.observable.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.system.global.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.weak-map.from.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.weak-map.of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.weak-set.from.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años es7.weak-set.of.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años web.dom.iterable.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años web.immediate.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años web.timers.js 11e3a9652a first %!s(int64=8) %!d(string=hace) años 增加批量删除销售员和消费者提交记录 · 1524f2e273 - Gogs: Go Git Service

增加批量删除销售员和消费者提交记录

FFIB лет %!s(int64=5): %!d(string=назад)
Родитель
Сommit
1524f2e273
2 измененных файлов с 22 добавлено и 12 удалено
  1. 20 12
      api/staff_views.py
  2. 2 0
      api/urls.py

+ 20 - 12
api/staff_views.py

@@ -76,7 +76,7 @@ def exec_del_clerk_sale_submit(pk, admin_id):
76 76
             admin_id=admin_id,
77 77
             log_pk=pk,
78 78
             model_name=model.model_name,
79
-            code=model.code
79
+            code=ssli.code
80 80
         )
81 81
 
82 82
         # 日销量统计
@@ -230,8 +230,10 @@ def del_clerk_sale_submit_api(request):
230 230
     admin_id = request.POST.get('admin_id', '')
231 231
     pk = int(request.POST.get('pk', ''))
232 232
 
233
-    if not AdministratorInfo.objects.filter(admin_id=admin_id, admin_type=AdministratorInfo.MAINTENANCE, user_status=AdministratorInfo.ACTIVATED, status=True).exists():
234
-        return response(AdministratorStatusCode.MAINTENANCE_NOT_FOUND)
233
+    try:
234
+        administrator = AdministratorInfo.objects.get(admin_id=admin_id, user_status=AdministratorInfo.ACTIVATED, status=True)
235
+    except AdministratorInfo.DoesNotExist:
236
+        return response(AdministratorStatusCode.ADMINISTRATOR_NOT_FOUND)
235 237
 
236 238
     exec_del_clerk_sale_submit(pk, admin_id)
237 239
 
@@ -242,10 +244,12 @@ def del_clerk_sale_submit_api(request):
242 244
 def batch_del_clerk_sale_submit_api(request):
243 245
     brand_id = request.POST.get('brand_id', settings.KODO_DEFAULT_BRAND_ID)
244 246
     admin_id = request.POST.get('admin_id', '')
245
-    pk = json.loads(request.POST.get('pks', []))
247
+    pks = json.loads(request.POST.get('pks', []))
246 248
 
247
-    if not AdministratorInfo.objects.filter(admin_id=admin_id, admin_type=AdministratorInfo.MAINTENANCE, user_status=AdministratorInfo.ACTIVATED, status=True).exists():
248
-        return response(AdministratorStatusCode.MAINTENANCE_NOT_FOUND)
249
+    try:
250
+        administrator = AdministratorInfo.objects.get(admin_id=admin_id, user_status=AdministratorInfo.ACTIVATED, status=True)
251
+    except AdministratorInfo.DoesNotExist:
252
+        return response(AdministratorStatusCode.ADMINISTRATOR_NOT_FOUND)
249 253
 
250 254
     for pk in pks:
251 255
         exec_del_clerk_sale_submit(pk, admin_id)
@@ -292,7 +296,7 @@ def exec_del_consumer_submit(pk, admin_id):
292 296
         admin_id=admin_id,
293 297
         log_pk=pk,
294 298
         model_name=model.model_name,
295
-        code=model.code
299
+        code=ssli.serialNo
296 300
     )
297 301
 
298 302
     # 消除用户劵
@@ -480,8 +484,10 @@ def del_consumer_submit_api(request):
480 484
     admin_id = request.POST.get('admin_id', '')
481 485
     pk = int(request.POST.get('pk', ''))
482 486
 
483
-    if not AdministratorInfo.objects.filter(admin_id=admin_id, admin_type=AdministratorInfo.MAINTENANCE, user_status=AdministratorInfo.ACTIVATED, status=True).exists():
484
-        return response(AdministratorStatusCode.MAINTENANCE_NOT_FOUND)
487
+    try:
488
+        administrator = AdministratorInfo.objects.get(admin_id=admin_id, user_status=AdministratorInfo.ACTIVATED, status=True)
489
+    except AdministratorInfo.DoesNotExist:
490
+        return response(AdministratorStatusCode.ADMINISTRATOR_NOT_FOUND)
485 491
 
486 492
     exec_del_consumer_submit(pk, admin_id)
487 493
 
@@ -493,10 +499,12 @@ def del_consumer_submit_api(request):
493 499
 def batch_del_consumer_submit_api(request):
494 500
     brand_id = request.POST.get('brand_id', settings.KODO_DEFAULT_BRAND_ID)
495 501
     admin_id = request.POST.get('admin_id', '')
496
-    pk = json.loads(request.POST.get('pks', []))
502
+    pks = json.loads(request.POST.get('pks', []))
497 503
 
498
-    if not AdministratorInfo.objects.filter(admin_id=admin_id, admin_type=AdministratorInfo.MAINTENANCE, user_status=AdministratorInfo.ACTIVATED, status=True).exists():
499
-        return response(AdministratorStatusCode.MAINTENANCE_NOT_FOUND)
504
+    try:
505
+        administrator = AdministratorInfo.objects.get(admin_id=admin_id, user_status=AdministratorInfo.ACTIVATED, status=True)
506
+    except AdministratorInfo.DoesNotExist:
507
+        return response(AdministratorStatusCode.ADMINISTRATOR_NOT_FOUND)
500 508
     
501 509
     for pk in pks:
502 510
         exec_del_consumer_submit(pk, admin_id)

+ 2 - 0
api/urls.py

@@ -231,7 +231,9 @@ urlpatterns += [
231 231
 
232 232
 urlpatterns += [
233 233
     url(r'^del/clerk/sale/submit$', staff_views.del_clerk_sale_submit_api, name='del_clerk_sale_submit_api'),
234
+    url(r'^batch/del/clerk/sale/submit$', staff_views.batch_del_clerk_sale_submit_api, name='batch_del_clerk_sale_submit_api'),
234 235
     url(r'^del/consumer/submit$', staff_views.del_consumer_submit_api, name='del_consumer_submit_api'),
236
+    url(r'^batch/del/consumer/submit$', staff_views.batch_del_consumer_submit_api, name='batch_del_consumer_submit_api'),
235 237
 ]
236 238
 
237 239
 urlpatterns += [